using System;
using System.Collections.Generic;
using System.Linq;

namespace MMXSaveGameConverter
{
    internal static class IEnumerableExm
    {
        public static IEnumerable<TTarget> NullSafeSelect<TSource, TTarget>(this IEnumerable<TSource> collection, Func<TSource, TTarget> selector)
        {
            return collection == null ? new TTarget[0] : collection.Select(selector);
        }
    }
}